package com.nuoniu.sibanyun.service.crm.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nuoniu.sibanyun.entity.crm.CrmGoodsCallSetting;
import com.nuoniu.sibanyun.mapper.crm.CrmGoodsCallSettingMapper;
import com.nuoniu.sibanyun.service.crm.ICrmGoodsCallSettingService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 白强
 * @since 2022-05-25
 */
@Service
public class CrmGoodsCallSettingServiceImpl extends ServiceImpl<CrmGoodsCallSettingMapper, CrmGoodsCallSetting> implements ICrmGoodsCallSettingService {

    @Override
    public CrmGoodsCallSetting getByGoodsId(Long goodsId) {
        QueryWrapper<CrmGoodsCallSetting> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("crm_goods_id",goodsId);
        queryWrapper.last("LIMIT 1");
        return getOne(queryWrapper,false);
    }
}
